/**
 * TomkittyEvents is a class to pass events back and forth between turdlets.
 * There should probably be one of these guys instantiated by the main turdlet
 * container, and then references to that instance passed to each turdlet,
 * thereby allowing them to register listeners.
 *
 * @author micha
 *
 */

package tomkitty.util;

import tomkitty.server.*;
import tomkitty.turdlet.*;
import java.util.Iterator;
import java.util.Hashtable;

public class TomkittyEvents {

	private static EventListenerCollection<EventListener> listeners = new EventListenerCollection<EventListener>();

	public static void addListener(EventListener listener) {
		listeners.add(listener);
	}

	public static void removeListener(EventListener listener) {
		listeners.remove(listener);
	}

	public static void emit(Event event) {
		listeners.fireEvent(event);
	}

}
